<?php
$mCardCooker = new BAMemberCardCooker();
$mPointCooker = new BAMemberPointCooker();
?>

<table class="table table-hover">
    <colgroup>
        <col class="span2">
        <col class="span6">
        <col class="span2">
    </colgroup>
    <thead>
        <tr>
            <th><?php echo '属性'; ?></th>
            <th><?php echo '内容'; ?></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <?php echo '名称'; ?>
            </td>
            <td>
                <?php
                echo CHtml::activeTextField($model, $typeNameField, array('placeholder' => '英文名' . '...', 'required' => true));
                ?>
            </td>
        </tr>
        <tr>
            <td>
                <?php echo '别名'; ?>
            </td>
            <td>
                <?php
                echo CHtml::activeTextField($model, $typeAliasField, array('placeholder' => '别名，显示名' . '...', 'required' => true));
                ?>
            </td>
        </tr>  
        <tr>
            <td>
                <?php echo '模版'; ?>
            </td>
            <td>
                <?php
                $templateData = array('0' => '选择模版');
                $templateData += $mCardCooker->getCardTypeTemplateData($preCardType);

                echo CHtml::activeDropDownList($model, $templateField, $templateData, array('class' => 'span5'));
                ?>
            </td>
        </tr>
        <?php if ($preCardType == BAMemberCardCooker::CardType_MemberPoint_Card) { ?>
            <tr>
                <td>
                    <?php echo '积分类型'; ?>
                </td>
                <td>
                    <?php
                    $memberPointTypeData = $mPointCooker->getMemberPointTypeList();
                    echo CHtml::activeDropDownList($model, $memberPointTypeField, $memberPointTypeData, array('class' => 'span5'));
                    ?>
                </td>
            </tr>
        <?php } ?>
    </tbody>
</table>

